<?php 
namespace Tools\Controller;
use Common\Controller\BaseController;
/**
 * 键值工具接口
 * @author HuHaiqin
 *
 */
class KeyvalController extends BaseController{
	
	/**
	 * @desc 根据key获取值
	 * @param string key 必须 关键词
	 * @return json 
	 */
	public function get_val(){
		if(!I('key')){
			_apiReturn(0, "miss param key", $data, $url);
		}
		$map['key'] = I('key');
		$data = M("Keyval")->where($map)->find();
		_apiReturn(1, "success", $data, $url);
	}
}
?>